package com.example.demo.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author Mr.yang
 * @TableName employee
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Employee implements Serializable {
    /**
     * ID
     */
    @TableId(value = "emp_id", type = IdType.AUTO)
    private Integer empId;

    /**
     * 员工名称
     */
    @TableField(value = "emp_name")
    private String empName;

    /**
     * 部门Id
     */
    @TableField(value = "emp_dept")
    private Integer empDept;

    /**
     * 联系电话
     */
    @TableField(value = "emp_phone")
    private String empPhone;

    /**
     * 电子邮箱
     */
    @TableField(value = "emp_email")
    private String empEmail;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonIgnore
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonIgnore
    private Date updateTime;

    private static final long serialVersionUID = 1L;
}